package net.onceface.application;

import java.util.List;

import net.onceface.application.commons.InvokeResult;
import net.onceface.application.dto.OrderDTO;
import net.onceface.core.domain.Order;
import net.onceface.core.domain.enums.OrderStatus;

public interface OrderApplication {

	/**
	 * 获得订单详情
	 * */
	OrderDTO getDetailByOrderNumber(String orderNumber);
	
	/**
	 * 按状态获取用户订单
	 * **/
	List<OrderDTO> findOrderByClient(Long clientId, String status);
	
	/**
	 * 客户取消订单
	 * **/
	InvokeResult cancelOrder(Long clientId, Long Id);
	
	/**
	 * 执行订单分析
	 * **/
	OrderDTO orderAnalysis(Long userId, Long disCountId);
	
	/**
	 * 提交订单
	 * **/
	InvokeResult placeOrder(OrderDTO orderDTO);
	
	/**
	 * 根据订单编号获得订单详情
	 * **/
	OrderDTO getOrderByNumber(String orderNumber);
	
	/**
	 * 修改订单状态,ID或订单编号
	 * **/
	InvokeResult editStatus(Long id, String orderNumber, OrderStatus orderStatus);
	
	/**
	 * 更新订单
	 * **/
	InvokeResult update(Order order);
}
